package com.xinqi.modules.course.content.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.course.content.domain.CourseContentEntity;
import com.xinqi.modules.course.content.dto.req.CourseContentCreateDTO;
import com.xinqi.modules.course.content.dto.req.CourseContentUpdateDTO;
import com.xinqi.modules.course.content.dto.rsp.CourseContentResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

import java.util.List;

/**
 * 课程内容表转换
 *
 * @author: system
 * @date: 2023/03/09
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class CourseContentConvert {
    public abstract CourseContentEntity create(CourseContentCreateDTO s);

    public abstract CourseContentEntity update(CourseContentUpdateDTO s, @MappingTarget CourseContentEntity t);

    public abstract CourseContentEntity update(CourseContentUpdateDTO s);

    public abstract CourseContentResultDTO convert(CourseContentEntity s);

    public abstract List<CourseContentResultDTO> convertList(List<CourseContentEntity> list);
}
